package com.hanliukui.ai.langchain4j.assistant.translate;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ai-translate")
public class TranslateAssistantController {

    private final TranslateAssistant translateAssistant;

    public TranslateAssistantController(TranslateAssistant translateAssistant) {
        this.translateAssistant = translateAssistant;
    }

    @GetMapping("/chat")
    public String translate(String content) {
        return translateAssistant.translate(content);
    }
}
